﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace MvcApplication.Common.Utility
{
    /// <summary>
    /// 与其他网站的Aes不相同
    /// </summary>
    public class AesUtil
    {
        public static string Encryption(string strContent, string strKey)
        {
            return WarNov.AesManagedWrapper.Win32.RMWCrypto.EncryptStringAES(strContent, strKey);
        }

        public static string Decryption(string strContent, string strKey)
        {
            // 如果secret不正确会报错
            return WarNov.AesManagedWrapper.Win32.RMWCrypto.DecryptStringAES(strContent, strKey);
        }
    }
}
